package main

import (
	"fmt"
)

var chan__ chan int = make(chan int)

func loop(enter string) {
	a := make([]int, 10)
	x := 0
	for i, _ := range a {
		a[i] = x
		x++
	}

	for _, v := range a {
		fmt.Printf("%s %d  ", enter, v)
	}
	fmt.Println("loop end")
}

func loop1(enter string) {
	a := make([]int, 10)
	x := 0
	for i, _ := range a {
		a[i] = x
		x++
	}

	for _, v := range a {
		fmt.Printf("%s %d  ", enter, v)
	}
	fmt.Println("loop1 end")
	chan__ <- 123

}

func main() {
	go loop1("go")
	loop("normal")

	//time.Sleep(time.Second)
	fmt.Println(<-chan__)
}
